<?php
session_start();
// Connect to the DB.
$_SESSION["errmsg"] = '';
require_once '../include/config.lib.php';
require_once '../include/database.lib.php';
ConnectToDB();

function deleteUser($userID){	// function to delete the selected user account from teh database
	$deleteUser = DBExecute("DELETE FROM person WHERE id = ?", array($userID));
}

deleteUser($_SESSION["deleteuserid"]);

$url = "../index.php";
echo "<HTML><META http-equiv=\"refresh\" content=\"0; url='".$url."'\"></HTML>";
?>